<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
String mid=request.getParameter("mid");
String lng=request.getParameter("lng");
%>
<script type="text/javascript" src="<%=path %>/js/management.js"></script>
<script type="text/javascript" src="<%=path %>/resources/jquery/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=path %>/resources/jquery/jquery.form.js"></script>
<script type="text/javascript" src="<%=path %>/js/lianxiwomen.js"></script>
<script type="text/javascript">
var mid = '<%=mid%>';
var lng = '<%=lng%>';
var path='<%=path%>';
//加载方式
$(document).ready(
		
		function() {
			
		 	$.ajax({
				type : "post",
				url : "neirongAction.do",
				dataType : "json",
				data : {
					"menuVO.mid":mid,
					"menuVO.lng":lng
				},
				success : function(data) {	
				    var documentList = data.documentVOList;
					var html = '';
					//循环遍历内容
					/* html+=('<label>联系方式:</label>') */
					 for (var i = 0; i < documentList.length; i++) {
						html+=('<div style = "width:95%;height:120px;border:2px solid green;">');
						html+=('<div class="cont"style = "margin-top:8pt;margin-left:5pt; float:left"><textarea rows="5" cols="100" class="contentt" name="documentList.content">'+documentList[i].content+'</textarea></div>'
						+'<input class="del" type="button" style = "float:right;margin-top:70px;" value="删除"/><br>');	
						html+=('</div><br>');
					}
					$(".content").html(html); 
					//页面内容增加
					
					$("#add").click(function(){
						$(".content").append('<div style = "width:95%;height:120px;border:2px solid green;">'
						                    +'<div class="cont" style = "margin-top:8pt;margin-left:5pt;float:left">'
						                    +'<textarea rows="5" cols="100" class="contentt" name="documentList.content"></textarea></div>'
						                    +'<input class="del" type="button" style = "float:right;margin-top:70px;" value="删除"/><br></div><br>');
						$(".del").click(function() {
							$(this).parent().remove();
						 }); 
						//alert($(".content").html());
					});
					
					//页面内容删除
					 $(".del").click(function() {
							$(this).parent().remove();
					 }); 
				} 
			});  
		});
</script>




<a href="javascript:void(0)" id="add" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a> 
<a href="javascript:void(0)" id="savecpfa" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="savecpfa()">保存</a>
<form action="savelxwmAction.do" method="post" enctype="multipart/form-data" id="form">
	<input type="text" name="menuVo.mid" value=<%=mid%> style="visibility:hidden" />
	<input type="text" name="menuVo.lng" value=<%=lng%> style="visibility:hidden" />
	<div class="content" align="center">
	</div>
</form>
